﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DARE
{
    public class CInventoryPageData : CWidgetData
    {
        public CInventoryData inventory;

        public override void FillDataStructure(CWidget wid)
        {
            CInventoryPage w = wid as CInventoryPage;
            base.FillDataStructure(wid);
            inventory = new CInventoryData();
            inventory.FillDataStructure(w.Inventory);
        }

        public override void FillFromDataStructure(ref CWidget wid, CHUDSystem hud)
        {
            base.FillFromDataStructure(ref wid, hud);
            (wid as CInventoryPage).Inventory = hud.GetElement(inventory.name) as CInventory;
        }
    }
}
